<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
$api = app('Dingo\Api\Routing\Router');

$api->version('v1', [
    'namespace' => 'App\Http\Controllers\Api'
], function($api) {
    // 微信登录
    $api->post('WxLogin', 'UserController@Login')
        ->name('api.user.login');
    // 获取token
    $api->post('GetToken', 'TokenController@gettoken')
        ->name('api.token.gettoken');
    // 获取用户信息
    $api->post('GetUserInfo', 'UserController@GetUserInfo')
        ->name('api.User.GetUserInfo');
    $api->post('subone/FallibleQuestions', 'SuboneController@GetFallibleQuestions');
    $api->post('subfour/FallibleQuestions', 'SubFourController@GetFallibleQuestions');
    $api->post('ImageUpload', 'ImageController@ImageUpload');
    $api->post('subone/TopicOfDispute', 'SuboneController@TopicOfDispute');
    $api->post('subfour/TopicOfDispute', 'SubFourController@TopicOfDispute');
    $api->post('subone/GetChaptersList', 'SuboneController@GetChaptersList');
    $api->post('subfour/GetChaptersList', 'SubFourController@GetChaptersList');
    $api->post('subone/SimulationPractice', 'SuboneController@SimulationPractice');
    $api->post('subfour/SimulationPractice', 'SubFourController@SimulationPractice');
    $api->post('GetProblemList', 'SuboneController@GetProblemList');

    $api->get('subone/RandomPactice', 'SuboneController@RandomPactice');
    $api->get('subfour/RandomPactice', 'SubFourController@RandomPactice');
    //按分类查找
    $api->post('subone/Classification', 'SuboneController@Classification');
    $api->post('subfour/Classification', 'SubFourController@Classification');
    //顺序练习
    $api->get('subone/SequencePractice', 'SuboneController@SequencePractice');
    $api->get('subfour/SequencePractice', 'SubFourController@SequencePractice');
    //小车必考
    $api->post('CarCompulsory', 'SubTwoController@CarCompulsory');
    //大车必考
    $api->post('TheCompulsory', 'SubTwoController@TheCompulsory');
    //入门知识及操作机件
    $api->post('IntroductoryKnowledge', 'SubTwoController@IntroductoryKnowledge');
    $api->post('GetVideoInfos', 'SubTwoController@GetVideoInfos');
    $api->post('GetVideoHtml', 'SubTwoController@GetVideoHtml');
    $api->post('GetSubOneCate',  'SuboneController@GetSubOneCate');
    $api->post('GetSubFourCateByApi', 'SubFourController@GetSubOneCate');
    $api->post('Mp3List', 'SuboneController@Mp3List');
    $api->post('IconCate', 'IconController@IconCate');
    $api->post('IconCateList', 'IconController@IconCateList');
    $api->post('TrafficPoliceGesture', 'IconController@TrafficPoliceGesture');
    $api->post('TrafficPoliceGestureInfo', 'IconController@TrafficPoliceGestureInfo');
    $api->post('AppUplaod', 'AppController@AppUplaod');
    $api->post('AppDownload', 'AppController@AppDownload');
    $api->post('AppChexTest', 'AppController@AppChexTest');
    $api->post('GetAd', 'AppController@GetAd');





});

$api->version('v1', [
    'namespace' => 'App\Http\Controllers\Admin'
], function($api){
    // 图片上传
    $api->post('imageiconadd', 'SuboneController@imageiconadd');

    $api->post('GetImageList', 'SuboneController@GetImageList');
    $api->post('DelImageList', 'SuboneController@DelImageList');
    $api->post('GetImafeInfo', 'SuboneController@GetImafeInfo');
    $api->post('imageiconsave', 'SuboneController@imageiconsave');
    $api->post('SubOneSearch', 'SuboneController@SubOneSearch');
    $api->post('SubForSearch', 'SubFourController@SubFourSearch');
    $api->post('ProblemAdd', 'SuboneController@ProblemAdd');
    $api->post('getproblemlist', 'SuboneController@getproblemlist');
    $api->post('getprobleminfo', 'SuboneController@getprobleminfo');
    $api->post('Problemsave', 'SuboneController@Problemsave');
    $api->post('problemdel', 'SuboneController@problemdel');
    $api->post('adadd', 'SuboneController@adadd');
    $api->post('adlist', 'SuboneController@adlist');
    $api->post('delad', 'SuboneController@delad');
    $api->post('adinfo', 'SuboneController@adinfo');
    $api->post('adsave', 'SuboneController@adsave');
    $api->post('getuserlist', 'SuboneController@getuserlist');
    $api->post('serachimage', 'SuboneController@serachimage');



    //科目二
    $api->post('SubTwo/CateAdd', 'SubTwoController@CateAdd');
    $api->post('GetSubTwoLevel2', 'SubTwoController@GetSubTwoLevel2');
    $api->post('SubTwo/VideoAdd', 'SubTwoController@VideoAdd');
    $api->post('SubTwo/VideoSave', 'SubTwoController@VideoSave');
    $api->post('SubTwo/SaveCate', 'SubTwoController@SaveCate');
    $api->post('GetSubTwoCateList', 'SubTwoController@GetSubTwoCateList');
    $api->post('GetSubTwoCateLists', 'SubTwoController@GetSubTwoCateLists');
    $api->post('SubTwoDels', 'SubTwoController@SubTwoDels');
    $api->post('GetSubTwoCate', 'SubTwoController@GetSubTwoCate');
    $api->post('GetVideoList', 'SubTwoController@GetVideoList');
    $api->post('VideoDels', 'SubTwoController@VideoDels');
    $api->post('GetVideoInfo', 'SubTwoController@GetVideoInfo');
    $api->post('GetSubTwoCateList2', 'SubTwoController@GetSubTwoCateList2');
    $api->post('GetSubTwoVideo', 'SubTwoController@GetSubTwoVideo');
    $api->post('SearchVideoByp', 'SubTwoController@SearchVideoByp');


    //科目三

    $api->post('Mp3Add', 'SubThreeController@Mp3Add');
    $api->post('GetMp3List', 'SubThreeController@GetMp3List');
    $api->post('GetMp3Info', 'SubThreeController@GetMp3Info');
    $api->post('Mp3AddSave', 'SubThreeController@Mp3AddSave');
    $api->post('DelMp3', 'SubThreeController@DelMp3');

    //科目四
    $api->post('GetSubFourCate','SubFourController@GetSubFourCate');
    $api->post('GetSubFourChapters','SubFourController@GetSubFourChapters');
    $api->post('SubFourAdd','SubFourController@SubFourAdd');
    $api->post('GetSubFourList','SubFourController@GetSubFourList');
    $api->post('SubFourZy','SubFourController@SubFourZy');
    $api->post('SubFourYc','SubFourController@SubFourYc');
    $api->post('GetSubFourInfo','SubFourController@GetSubFourInfo');
    $api->post('SubFourSave','SubFourController@SubFourSave');
    $api->post('SubFourdels','SubFourController@SubFourdels');



});